/**
 *
 */
package jp.seraph.same.controller;

import jp.seraph.jsade.math.Angle;
import jp.seraph.jsade.model.JointIdentifier;
import jp.seraph.same.model.PoseModel;

/**
 *
 */
public class DefaultPoseController implements PoseController {
    public DefaultPoseController(String aName, PoseModel aModel, PoseManagerController aParentController) {
        mName = aName;
        mPoseModel = aModel;
        mParentController = aParentController;
    }

    private String mName;
    private PoseModel mPoseModel;
    private PoseManagerController mParentController;

    /**
     * @see jp.seraph.same.controller.PoseController#setAngle(jp.seraph.jsade.model.JointIdentifier, jp.seraph.jsade.math.Angle)
     */
    public void setAngle(JointIdentifier aId, Angle aAngle) {
        mPoseModel.setAngle(aId, aAngle);
    }

    /**
     *
     * @see jp.seraph.same.controller.PoseController#delete()
     */
    public void delete() {
        mParentController.removePose(mName);
    }
}
